#include <ledParamTables.h>
/* Efficiency is 1024 @25C , the value is 990*1024/1000 when efficiency is 99.0% 

Based on the following rgb current measurement
RED=30mA,GREEN=30mA,BLUE=30mA

*/ 
static const TempParams_t TEMP_CURVE_TABLE_RED[TEMP_CMP_NUM_MAX] = 
{
    /*T(1C) efficiency deltaV(mV) x(%), y(%) */
/*0*/{1167U,37,1022U,1028U},
/*2*/{1155U,33,1022U,1027U},
/*4*/{1143U,30,1022U,1027U},
/*6*/{1131U,30,1022U,1027U},
/*8*/{1119U,26,1022U,1026U},
/*10*/{1107U,22,1022U,1026U},
/*12*/{1095U,20,1023U,1026U},
/*14*/{1083U,16,1023U,1025U},
/*16*/{1071U,14,1023U,1025U},
/*18*/{1059U,11,1023U,1025U},
/*20*/{1047U,7,1023U,1024U},
/*22*/{1035U,3,1023U,1024U},
/*24*/{1024U,0,1024U,1024U},
/*26*/{1012U,-1,1024U,1023U},
/*28*/{1000U,-5,1024U,1023U},
/*30*/{988U,-8,1024U,1022U},
/*32*/{976U,-11,1024U,1022U},
/*34*/{964U,-13,1024U,1022U},
/*36*/{952U,-15,1024U,1021U},
/*38*/{940U,-17,1025U,1021U},
/*40*/{928U,-21,1025U,1021U},
/*42*/{916U,-24,1025U,1020U},
/*44*/{904U,-27,1025U,1020U},
/*46*/{892U,-30,1025U,1020U},
/*48*/{880U,-33,1025U,1019U},
/*50*/{868U,-36,1025U,1019U},
/*52*/{856U,-39,1026U,1019U},
/*54*/{844U,-40,1026U,1018U},
/*56*/{832U,-42,1026U,1018U},
/*58*/{820U,-46,1026U,1018U},
/*60*/{808U,-48,1026U,1017U},
/*62*/{796U,-50,1026U,1017U},
/*64*/{784U,-54,1026U,1016U},
/*66*/{772U,-58,1027U,1016U},
/*68*/{760U,-61,1027U,1016U},
/*70*/{748U,-64,1027U,1016U},
/*72*/{736U,-68,1027U,1015U},
/*74*/{723U,-73,1027U,1015U},
/*76*/{709U,-75,1027U,1014U},
/*78*/{697U,-78,1027U,1015U},
/*80*/{684U,-80,1027U,1014U},
/*82*/{671U,-82,1028U,1014U},
/*84*/{658U,-84,1028U,1014U},
/*86*/{645U,-86,1028U,1013U},
/*88*/{634U,-89,1028U,1014U},
/*90*/{622U,-91,1028U,1013U},
/*92*/{609U,-94,1028U,1013U},
/*94*/{598U,-97,1028U,1013U},
/*96*/{588U,-99,1028U,1012U},
/*98*/{578U,-104,1028U,1012U},
/*100*/{570U,-106,1028U,1012U},
/*102*/{562U,-109,1028U,1011U},
/*104*/{555U,-110,1029U,1011U},
/*106*/{547U,-113,1029U,1011U},
/*108*/{539U,-116,1029U,1010U},
/*110*/{531U,-118,1029U,1010U},
/*112*/{523U,-120,1029U,1009U},
/*114*/{516U,-122,1029U,1009U},
/*116*/{508U,-124,1029U,1009U},
/*118*/{500U,-126,1030U,1008U},
/*120*/{492U,-128,1030U,1008U},


};

static const TempParams_t TEMP_CURVE_TABLE_GREEN[TEMP_CMP_NUM_MAX] = 
{
/*0*/{1042U,80,1000U,1030U},
/*2*/{1040U,72,1002U,1030U},
/*4*/{1039U,64,1004U,1029U},
/*6*/{1037U,62,1006U,1029U},
/*8*/{1036U,55,1008U,1028U},
/*10*/{1034U,45,1010U,1028U},
/*12*/{1033U,35,1012U,1027U},
/*14*/{1031U,28,1014U,1026U},
/*16*/{1030U,23,1016U,1026U},
/*18*/{1028U,18,1018U,1025U},
/*20*/{1027U,12,1020U,1025U},
/*22*/{1025U,6,1022U,1024U},
/*24*/{1024U,0,1024U,1024U},
/*26*/{1022U,-5,1025U,1023U},
/*28*/{1020U,-10,1027U,1022U},
/*30*/{1019U,-15,1029U,1022U},
/*32*/{1017U,-17,1031U,1021U},
/*34*/{1016U,-22,1033U,1021U},
/*36*/{1014U,-26,1035U,1020U},
/*38*/{1013U,-32,1037U,1019U},
/*40*/{1011U,-38,1039U,1019U},
/*42*/{1010U,-42,1041U,1018U},
/*44*/{1008U,-46,1043U,1018U},
/*46*/{1007U,-51,1045U,1017U},
/*48*/{1005U,-54,1047U,1017U},
/*50*/{1003U,-56,1049U,1016U},
/*52*/{1002U,-59,1051U,1015U},
/*54*/{1000U,-62,1053U,1015U},
/*56*/{999U,-66,1055U,1014U},
/*58*/{997U,-70,1057U,1014U},
/*60*/{996U,-73,1059U,1013U},
/*62*/{994U,-77,1061U,1013U},
/*64*/{993U,-79,1063U,1012U},
/*66*/{991U,-82,1065U,1011U},
/*68*/{990U,-85,1067U,1011U},
/*70*/{988U,-88,1069U,1010U},
/*72*/{987U,-91,1071U,1010U},
/*74*/{985U,-93,1073U,1009U},
/*76*/{983U,-96,1075U,1008U},
/*78*/{982U,-98,1077U,1008U},
/*80*/{980U,-99,1079U,1007U},
/*82*/{979U,-105,1081U,1007U},
/*84*/{976U,-107,1085U,1006U},
/*86*/{974U,-110,1087U,1005U},
/*88*/{973U,-112,1090U,1005U},
/*90*/{970U,-117,1095U,1004U},
/*92*/{968U,-120,1099U,1003U},
/*94*/{965U,-122,1103U,1003U},
/*96*/{962U,-124,1107U,1002U},
/*98*/{960U,-127,1111U,1001U},
/*100*/{957U,-129,1115U,1000U},
/*102*/{955U,-130,1119U,999U},
/*104*/{952U,-132,1123U,999U},
/*106*/{949U,-134,1127U,998U},
/*108*/{946U,-136,1131U,997U},
/*110*/{943U,-137,1136U,996U},
/*112*/{941U,-139,1140U,996U},
/*114*/{938U,-141,1145U,995U},
/*116*/{935U,-143,1150U,994U},
/*118*/{932U,-145,1153U,993U},
/*120*/{929U,-147,1157U,992U},

};

static const TempParams_t TEMP_CURVE_TABLE_BLUE[TEMP_CMP_NUM_MAX] = 
{
    /*T(1C) efficiency deltaV(mV) x(%), y(%) */
/*0*/{999U,35,1031U,961U},
/*2*/{1001U,30,1031U,967U},
/*4*/{1003U,26,1030U,972U},
/*6*/{1005U,27,1029U,977U},
/*8*/{1007U,23,1029U,982U},
/*10*/{1009U,21,1028U,987U},
/*12*/{1011U,18,1027U,992U},
/*14*/{1013U,15,1027U,998U},
/*16*/{1015U,11,1026U,1003U},
/*18*/{1017U,9,1025U,1008U},
/*20*/{1019U,6,1025U,1013U},
/*22*/{1021U,3,1024U,1018U},
/*24*/{1024U,0,1024U,1024U},
/*26*/{1026U,-2,1023U,1029U},
/*28*/{1028U,-5,1022U,1034U},
/*30*/{1030U,-7,1022U,1039U},
/*32*/{1032U,-11,1021U,1044U},
/*34*/{1034U,-13,1020U,1049U},
/*36*/{1036U,-16,1020U,1055U},
/*38*/{1038U,-18,1019U,1060U},
/*40*/{1040U,-21,1018U,1065U},
/*42*/{1042U,-23,1018U,1070U},
/*44*/{1044U,-25,1017U,1075U},
/*46*/{1046U,-28,1016U,1080U},
/*48*/{1048U,-30,1016U,1086U},
/*50*/{1050U,-32,1015U,1091U},
/*52*/{1052U,-35,1014U,1096U},
/*54*/{1054U,-36,1014U,1101U},
/*56*/{1056U,-38,1013U,1106U},
/*58*/{1058U,-40,1013U,1111U},
/*60*/{1060U,-41,1012U,1117U},
/*62*/{1062U,-44,1011U,1122U},
/*64*/{1064U,-46,1011U,1127U},
/*66*/{1066U,-47,1010U,1132U},
/*68*/{1069U,-49,1009U,1137U},
/*70*/{1071U,-51,1009U,1142U},
/*72*/{1073U,-53,1008U,1148U},
/*74*/{1075U,-55,1007U,1153U},
/*76*/{1077U,-59,1007U,1158U},
/*78*/{1079U,-61,1006U,1163U},
/*80*/{1081U,-63,1005U,1168U},
/*82*/{1083U,-66,1005U,1173U},
/*84*/{1085U,-68,1005U,1173U},
/*86*/{1087U,-69,1004U,1179U},
/*88*/{1089U,-71,1004U,1184U},
/*90*/{1092U,-73,1003U,1189U},
/*92*/{1095U,-75,1002U,1194U},
/*94*/{1098U,-77,1002U,1199U},
/*96*/{1101U,-78,1001U,1199U},
/*98*/{1104U,-80,1001U,1210U},
/*100*/{1107U,-81,1000U,1210U},
/*102*/{1110U,-82,1000U,1215U},
/*104*/{1114U,-84,999U,1220U},
/*106*/{1117U,-85,998U,1225U},
/*108*/{1120U,-86,998U,1230U},
/*110*/{1123U,-88,997U,1236U},
/*112*/{1126U,-89,996U,1241U},
/*114*/{1129U,-90,996U,1251U},
/*116*/{1132U,-91,995U,1256U},
/*118*/{1135U,-92,995U,1267U},
/*120*/{1138U,-93,994U,1272U},

};

TempParams_t const * LP_GetTempTableRed(LedNum_t ledIndex)
{
    return TEMP_CURVE_TABLE_RED;
}

TempParams_t const * LP_GetTempTableGreen(LedNum_t ledIndex)
{
    return TEMP_CURVE_TABLE_GREEN;
}

TempParams_t const * LP_GetTempTableBlue(LedNum_t ledIndex)
{
    return TEMP_CURVE_TABLE_BLUE;
}



/*
const AccurateColorXYY_t calibratedColortable[] = 
{
  {21845, 21845, 100, 255,255,255},
  {X0, Y0, 100, 254,254,255},
};
*/



